package edu.sjtu.grid.workflow.facts;

import org.dom4j.Element;

public class PC {

	private int index = -1;

	private String id = null;
	private double speed = 0;
	private Cost cost = null;

	public PC(Element ePC, int index)
	{
		this.index = index;
		
		this.id = ePC.attributeValue("id");
		this.speed = Double.parseDouble(ePC.attributeValue("speed"));
		this.cost = Cost.ParseCost(ePC);
		
	}

	public int getIndex() {
		return index;
	}
	
	public String getId() {
		return id;
	}

	public double getSpeed() {
		return speed;
	}

	public Cost getCost() {
		return cost;
	}
}
